package com.itheima.string;
//char At方法
import java.util.Scanner;

public class Tesrt02 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入字符串");
        String s = sc.nextLine();//遍历字符串,获取其中每一个字符
        for (int i = 0; i <s.length() ; i++) {
            System.out.println(s.charAt(i));//i充当索引
        }
        System.out.println(s.length());

    }
}
